
<link rel="stylesheet" type="text/css" href="#url('/static/comm/ztree/css/zTreeStyle/zTreeStyle.css')">

<script src="#url('/static/comm/ztree/js/jquery.ztree.all.js')"></script>
<script src="#url('/static/js/util/util.js')"></script>
<script type="text/javascript" >
    AppComm.include.load("#url('/static/comm/js/manager/groupManager.js')","js");
    AppComm.include.load("#url('/static/js/common/commonZtree.js')","js");
</script>

<!--<div class="animated fadeIn">-->
<div class="layui-tab-item layui-show">
    <!--系统管理 / 组织管理-->
    <!--<div style="text-align: left;">-->
        <!--<span class="layui-breadcrumb">-->
                <!--<a href="">系统管理</a>-->
                <!--<a><cite>组织管理</cite></a>-->
        <!--</span>-->
    <!--</div>-->
    <!--<hr>-->
    <div class="groupManager_box"></div>
</div>
<script id="groupManagerList_template" type="text/html">
    <div style="text-align: left;">
        <form class="layui-form" lay-filter="searchForm" action="">
            <div class="layui-inline">
                <!--<label class="layui-form-label">组织名称</label>-->
                <div class="layui-input-inline">
                    <input name="groupName" type="text" placeholder="组织名称" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="searchBtn">查询</button>
                #hasPermission('groupManager:add','<button class="layui-btn layui-btn-normal" id="addBtn">添加</button>')
                <button class="layui-btn layui-btn-normal" style="background-color: #1E9FFF" id="viewGroupTreeBtn">查看组织树</button></div>
        </form>
    </div>

    <div style="margin-right: 10px;">
        <table id="tb_list" lay-filter="tb_list"></table>
    </div>
</script>

<script type="text/html" id="toolbar">
    #hasPermission('groupManager:edit','<a class="layui-btn layui-btn-xs" lay-event="editBtn">编辑</a>')
    #hasPermission('groupManager:delete','<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="deleteBtn">删除</a>')
</script>

<script id="groupManagerForm_template" type="text/html">
    <form class="layui-form site-block" action="" style="height: 650px;">
        <input type="hidden" id="id" value="{{id}}" >
        <div class="layui-tab-item layui-show" style="width:652px;margin: 0 auto;">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">组织名称</label>
                    <div class="layui-input-inline">
                        <input type="text" id="groupName" name="groupName" lay-verify="required|groupName" placeholder="请输入组织名称" autocomplete="off" class="layui-input" value="{{groupName}}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">上级组织</label>
                    <div class="layui-input-inline">
                        <input type="hidden" id="parentId" name="parentId" lay-verify="parentId" autocomplete="off" value="{{parentId}}">
                        <span style="display:none" id="parentNameInput"><input type="text" id="parentName" name="parentName" placeholder="请选择上级组织" autocomplete="off" class="layui-input" value="{{parentName}}"></span>
                        <span style="display:none; margin-top: 10px;" id="parentNameShow">{{parentName}}</span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">排序号</label>
                    <!--<div class="layui-input-inline">-->
                    <input type="text" id="orderId" name="orderId" lay-verify="required|number" placeholder="请输入排序号" autocomplete="off" class="layui-input" value="{{orderId}}" style="width: 500px;">
                    <!--</div>-->
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">说明</label>
                    <!--<div class="layui-input-inline">-->
                    <textarea placeholder="请输入内容" id="comment" name="comment" class="layui-textarea" style="width: 500px;">{{comment}}</textarea>
                    <!--</div>-->
                </div>
            </div>
            <br>
            <div class="layui-form-item">
                <div class="layui-inline" style="margin-left: 225px;width:182px;">
                    #hasPermission('groupManager:save','<a id="saveBtn" class="layui-btn layui-btn-normal" lay-event="saveBtn">提交</a>')
                    <button class="layui-btn layui-btn-normal" id="cancelBtn">取消</button>
                </div>
            </div>
        </div>
    </form>
</script>

<!--组织选择页-->
<script id="groupManagerList_group" type="text/html">
    <div style="text-align: left;margin: 10px;">
        <form class="layui-form" lay-filter="searchGroupForm" action="">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input name="groupNameInput" type="text" placeholder="组织名称" class="layui-input" style="width:200px;">
                </div>
            </div>
            <div class="layui-inline">
                &nbsp;&nbsp;
                <button class="layui-btn layui-btn-normal" lay-submit lay-filter="searchGroup">查询</button>
            </div>
        </form>
    </div>
    <div style="margin: 10px;">
        <table id="group_list" lay-filter="group_list" ></table>
    </div>
</script>


<!--查看组织树的页面-->
<script id="groupManagerList_ztree" type="text/html">
    <div style="margin-left: 24px;">
        <input type="hidden" id="dataId" value="{{dataId}}" >
        <ul id="treeDemo" class="ztree"></ul>
    </div>
</script>
